<template>
  <t-sub-menu>
    <template #title>{{ data.title }}</template>
    <template v-for="c of data.children">
      <t-menu-item
        :key="c.id"
        v-if="!c.children"
      >{{ c.title }}</t-menu-item>
      <t-re-sub-menu v-else :key="c.id" :data="c"></t-re-sub-menu>
    </template>
  </t-sub-menu>
</template>

<script>
export default {
  name: 'TReSubMenu',
  props: {
    data: Object
  }
}
</script>